#include<iostream>

using namespace std;

class Complex
{
private:
	double real; // 实部
	double imag; // 虚部
public:
	Complex()
    {
        real=0;
        imag=0;
    };
	Complex(double r, double i);
	// 友元函数，复数c1+c2（二参数对象相加）
    friend Complex addCom(const Complex &c1,const Complex &c2);
    friend Complex minusCom(const Complex &c1,const Complex &c2);
    friend void outCom(const Complex &c);
};

Complex::Complex(double r,double i)
{
    real=r;
    imag=i;
}

Complex addCom(const Complex &c1,const Complex &c2)
{
    Complex c;
    c.real=c1.real+c2.real;
    c.imag=c1.imag+c2.imag;
    return c;
}

void outCom(const Complex &c)
{
    cout<<"("<<c.real<<","<<c.imag<<")"<<endl;
}

Complex minusCom(const Complex &c1,const Complex &c2)
{
    Complex c;
    c.real=c1.real-c2.real;
    c.imag=c1.imag-c2.imag;
    return c;
}

int main()
{
    int real,imag;
    int t;
    char a;
    cin>>real>>imag>>t;
    Complex c(real,imag);
    while(t--)
    {
        cin>>a;
        cin>>real>>imag;
        Complex s(real,imag);
        if(a=='+')
        {
            c=addCom(c,s);
        }
        else
        {
            c=minusCom(c,s);
        }
        outCom(c);
    }
    return 0;
}